%h3 Character information
%table
  %tr
    %td Name
    %td= @character.name
  %tr
    %td Status
    %td= @character.active? ? "Active" : "Inactive"
%br

- if @character.active?
  %h3 DKP
  %table
    %tr
      %td Shares
      %td= @character.number_of_shares
    %tr
      %td DKP earned
      %td= number_with_precision(@character.dkp_earned)
    %tr
      %td DKP spent
      %td= number_with_precision(@character.dkp_spent)
    %tr
      %td DKP left
      %td= number_with_precision(@character.dkp)
  %br

- if (@character.loot.length > 0)
  %h3 Purchased items
  %table
    - @character.loot.each do |loot|
      %tr
        %td= link_to(loot.item.name, :controller => "items", :action => :show, :id => loot.item.id)
        %td= loot.price

- if (@character.raids.length > 0)
  %h3 Raids
  %table
    - @character.raids.uniq.each do |r|
      %tr{:class => (r.week.odd? ? "odd" : "even")}
        = render(:partial => r, :locals => { :raid => r })
  %br
